/**
* This file is part of OntoApplications (project linked with OntoCompoFramework)
*
* Copyright (C) 2011 -  Christian Brel
*
* @author   Main    Christian Brel
**/
package applications.insurancecard.ui.lib;

import java.awt.Color;

import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.objectweb.fractal.fraclet.annotations.Component;
import org.objectweb.fractal.fraclet.annotations.Interface;
import org.objectweb.fractal.fraclet.annotations.Requires;

import applications.insurancecard.fc.api.InsuranceInformation;

//@Component(provides={@Interface(name="insurancecarduiservice",signature=ontocompo.api.UIJFrameService.class), @Interface(name="insurancecarduirefreshservice",signature=applications.insurancecard.ui.api.InsuranceCardUIItf.class)})
@Component(provides = {@Interface(name = "jFrameItf", signature = org.objectweb.fractal.swing.JFrameItf.class), @Interface(name = "jFrameAttributes", signature = org.objectweb.fractal.swing.JFrameAttributes.class), @Interface(name = "uijframeservice", signature = ontocompo.api.UIJFrameService.class), @Interface(name = "ontocompointrospection", signature = ontocompo.api.OntoCompoIntrospection.class)})
public class InsuranceCardUI extends JFrame implements  org.objectweb.fractal.swing.JFrameItf, org.objectweb.fractal.swing.JFrameAttributes, ontocompo.api.UIJFrameService, ontocompo.api.OntoCompoIntrospection {
	
	private String uid;
	private String applicationName;
	
	private org.objectweb.fractal.api.Component c;
	
	@Requires(name = "mainpane")
	private ontocompo.api.UIContainerService mainpane;

	public InsuranceCardUI() {
		super();
		this.uid = "applications.insurancecard.ui.lib.InsuranceCardUI";
		this.applicationName = "InsuranceCard";
		System.out.println(this.toString() + " created");
		
		//this.init();
	}
	
	public void init()
	{	
		this.mainpane.init();
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		this.setContentPane(this.mainpane.getComponentItSelf());
		
		this.pack();
		this.setVisible(true);
	}

	@Override
	public String getApplicationName() {
		// TODO Auto-generated method stub
		return this.applicationName;
	}

	@Override
	public JFrame getJFrameItSelf() {
		// TODO Auto-generated method stub
		return this;
	}

	@Override
	public String getUid() {
		// TODO Auto-generated method stub
		return this.uid;
	}

	@Override
	public void setHeight(int height) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setWidth(int width) {
		// TODO Auto-generated method stub
		
	}
	
	public String toString() {
		return "InsuranceCardUI";
	}

	@Override
	public org.objectweb.fractal.api.Component getFractalComponent() {
		// TODO Auto-generated method stub
		return this.c;
	}

	@Override
	public void setFractalComponent(org.objectweb.fractal.api.Component c) {
		// TODO Auto-generated method stub
		this.c = c;
	}

	@Override
	public void setUid(String uid) {
		// TODO Auto-generated method stub
		this.uid = uid;
	}

}
